package cn.wolfcode.trip.api.controller;

import cn.wolfcode.trip.base.service.IFriendCircleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/friendCircles")
public class FriendCircleController {

    @Autowired
    private IFriendCircleService friendCircleService;

    /**
     * 根据动态(type=3)的id,查出所有的点赞用户LIst<Integer>的头像
     * 1.请求资源 /friendCircles/{id}/userImgs
     * 2.请求方式 get
     * 3.请求资源 路径占位符
     * 4.返回结果 list<String>
     */
    @GetMapping("/{id}/{userImgs}")
    public List<String> selectAllUserImgs(@PathVariable Long id) {
        List<String> imgs = friendCircleService.selectAllUserImgsByFriendCircleId(id);
        return imgs;
    }


}
